<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>商品小类显示</title>
    <meta charset="UTF-8">
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">

</head>
<body>
<!-- 顶栏 -->
<div th:replace="seller/topp"></div>
<!-- 中间主体 -->
<div class="container" id="content">
    <div class="row">
        <div th:replace="seller/menu::menu"></div>
        <div class="col-md-10">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="row">

                        <h3><a href="/seller/viewShowCategory">商品大类</a>
                            <a href="/seller/viewShowProduct">商品小类</a></h3>

                        <form class="bs-example bs-example-form col-md-5" role="form" style="margin: 20px 0 10px 0;" action="seller_searchProduct" id="form1" method="post">
                            <div class="input-group">
<!--                                <input type="text" class="form-control" placeholder="请输入名称" id="keyword" name="keyword">-->
<!--                                <span class="input-group-addon btn" onclick="document.getElementById('form1').submit" id="sub">搜索</span>-->
                                <input type="text" id="keyword" name="keyword" size="14" placeholder="请输入名称"/>
                                <input type="submit" name="searchProducts" value="搜索" />
                            </div>
                        </form>
                        <button class="btn btn-default col-md-2" style="margin-top: 20px" onClick="location.href='/seller/productAdd'">
                            添加商品小类
                            <sapn class="glyphicon glyphicon-plus"/>
                        </button>

                    </div>
                </div>

                <!--选择大类-->
                <div id="Menu1">
                    <div id="MenuContent">
                <a th:each="cate:${categoryList}">
                    <a th:href="@{'viewShowProduct?categoryId='+${cate.categoryId}}"  th:text="${cate.name}">category </a>
                    <img src="../images/separator.gif" />
                </a>
                    </div>
                </div>

                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>productId</th>
                        <th>category</th>
                        <th>name</th>
                        <th>description</th>
<!--                        <th>操作</th>-->
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="p:${productList}">
                        <td><a th:href="@{'viewShowItem?productId='+${p.productId}}" th:text="${p.productId}">productId</a></td>
                        <td th:text="${p.categoryId}">category</td>
                        <td th:text="${p.name}">name</td>
                        <td th:utext="${p.description}">descn</td>
<!--                        <td>-->
<!--                            <button class="btn btn-default btn-xs btn-info" onClick="location.href='#'">修改</button>-->
<!--                            <button class="btn btn-default btn-xs btn-danger btn-primary" onClick="location.href='#'">删除</button>-->
                            <!--弹出框-->
<!--                        </td>-->
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>